import React, { Component } from 'react';
import { Headers } from './header'
import connect from './connect';
@connect
class Header extends Component {
    render() {
        let { path } = this.props.match
        return (
            <>
                <Headers left={this.props.left}>
                    <ul>
                        <li className={
                            !this.props.flag ? 'active' : ''
                        } onClick={e => {
                            this.props.changFlag1()
                            this.props.history.push(path + '/list')
                        }}>正在热映</li>
                        <li className={
                            this.props.flag ? 'active' : ''
                        } onClick={e => {
                            this.props.changFlag2()
                            this.props.history.push(`${path}/flist`)
                            }}>即将上映</li>
                    </ul>
                    <div></div>
                </Headers>
            </>
        );
    }
}

export default Header;


